import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';

import 'color.dart';

///通用样式框配置
class KBoxStyle {
  static BoxDecoration selectItemStyle = const BoxDecoration(
    gradient: LinearGradient(
      begin: Alignment.topCenter,
      end: Alignment.bottomCenter,
      colors: <Color>[Color(0xffA0DAF7), Color(0xff6ECEFE)],
    ),
  );

  ///app通用顶部渐变背景
  static BoxDecoration loginopBg = const BoxDecoration(
    gradient: LinearGradient(
      begin: Alignment.topCenter,
      end: Alignment.bottomCenter, colors: [],
      // List: <Color>[Color(0xffFFBC62), Color(0xffFF6A7F)],
    ),
  );

  ///黑色背景
  static BoxDecoration blakGradientBg = const BoxDecoration(
    gradient: LinearGradient(
      begin: Alignment.topCenter,
      end: Alignment.bottomCenter,
      colors: <Color>[Color(0x00000000), Color(0x990D0409)],
    ),
  );

  ///通用渐变样式
  static LinearGradient themeGradient = const LinearGradient(
    begin: Alignment.topCenter,
    end: Alignment.bottomCenter,
    colors: <Color>[Color(0x90FFDEF2), Color(0x90B1E2FF)],
  );

  ///蓝色 - 全圆角背景
  static BoxDecoration blueRadioBg = BoxDecoration(
    border: Border.all(color: KColorConstant.theme, width: 0),
    color: KColorConstant.theme,
    borderRadius: BorderRadius.circular(50.r),
  );

  ///无色透明 - 全圆角背景
  static BoxDecoration radioBg = BoxDecoration(
      border: Border.all(color: KColorConstant.theme, width: 0),
      borderRadius: BorderRadius.circular(50.r),
      color: Colors.transparent);

  ///红色 - 全圆角背景
  static BoxDecoration redRadioBg = BoxDecoration(
    border: Border.all(color: KColorConstant.themeRed, width: 0),
    color: KColorConstant.themeRed,
    borderRadius: BorderRadius.circular(50.r),
  );

  ///灰色 - 全圆角背景
  static BoxDecoration grayRadioBg = BoxDecoration(
    border: Border.all(color: KColorConstant.lineColor, width: 0),
    color: KColorConstant.lineColor,
    borderRadius: BorderRadius.circular(50.r),
  );

  ///灰色背景框 - 线框
  static BoxDecoration grayBgStyleLine = BoxDecoration(
    border: Border.all(color: KColorConstant.grayColor, width: 1.0),
    color: Colors.transparent,
    borderRadius: BorderRadius.circular(50.r),
  );

  ///灰色背景框 - 线框
  static BoxDecoration grayStyleLine = BoxDecoration(
    border: Border.all(color: KColorConstant.lineColor, width: 1.0),
    color: Colors.transparent,
    borderRadius: BorderRadius.circular(10.r),
  );

  //线框样式
  static BoxDecoration lineRadio(
      {Color? lineColor = Colors.transparent, Color? bgColor = Colors.white, double? radiusSize = 10}) {
    return BoxDecoration(
      border: Border.all(color: lineColor!, width: 1.h),
      color: bgColor,
      borderRadius: BorderRadius.circular(radiusSize!.r),
    );
  }
}
